/*
 * @Description: 督办管理接口
 * @Author: Huang Junjie
 * @Date: 2021-05-08 12:08:59
 * @LastEditTime: 2021-05-10 10:17:39
 * @LastEditors: Huang Junjie
 */
import request from '@/utils/request';

// 分页查询
export function getDataList(params) {
  return request({
    url: `/jjxt/workDealt/listPage`,
    method: 'get',
    params
  });
}

// 保存或更新
export function updateList(data) {
  return request({
    url: `/jjxt/workDealt/saveOrUpdate`,
    method: 'post',
    data
  });
}

// 批量删除
export function deleteData(data) {
  return request({
    url: `/jjxt/workDealt/delete`,
    method: 'delete',
    data
  });
}

// 导出
export function exportFile(params) {
  return request({
    url: `/jjxt/workDealt/export`,
    method: 'get',
    params,
    responseType: 'blob'
  });
}

// 归档
export function archiveWorkDealt(data) {
  return request({
    url: `/jjxt/workDealt/filing`,
    method: 'put',
    data
  });
}

// 退回
export function backWorkDealt(data) {
  return request({
    url: `/jjxt/workDealt/sendBack`,
    method: 'put',
    data
  });
}

// 推进情况填写/保存
export function promoteSituation(data) {
  return request({
    url: `/jjxt/workDealt/saveOrUpdateUndertake`,
    method: 'post',
    data
  });
}

// 获取科室列表信息
export function getDepartmentDataList() {
  return request({
    url: `/jjxtapi/dept/findGdbBelowDeptList`,
    method: 'get'
  });
}

// 获取供电部下的所有科室主任
export function getDepartmentDirectorDataList() {
  return request({
    url: `/jjxtapi/staff/findDirectorList`,
    method: 'get'
  });
}
